"use strict";

var result = eval(`(
  function doSomething(name) {
    global.x = 10;
    // age = 12; //严格模式下会报错
    name += '-abc';
    return name;
  }
)`);
console.log(result); //是函数doSomething
console.log(result('aa')); // aa-abc
console.log(global.x); //10
// console.log(age);
